//
//  ControlPane;.h
//  iCodeMac
//
//  Created by Andrew Barry on 27/02/09.
//  Copyright 2009 Barry Computer Services. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class FormControl;
@class JavascriptForm;
@class GenericController;
@class ControlsDataSource;

@interface ControlPanel : NSObject {
	IBOutlet NSPanel *panel;
	IBOutlet NSScrollView *propsScroller;
	IBOutlet NSView *properties;
	IBOutlet GenericController *controller;
	IBOutlet NSTableView *controlsTableView;
	IBOutlet ControlsDataSource *controlsDataSource;
	FormControl *current;
	JavascriptForm *form;
}
+(ControlPanel *) sharedPanel;
+(FormControl *) currentObject;
+(JavascriptForm *) form;
+(id) valueForProperty: (NSString *) name;
+(void) setValue: (id) val forProperty:(NSString*) name;
+(void) updateValue: (id) val forProperty: (NSString *) name forControl: (FormControl *)ctl;
+(NSSize) defaultControlSize: (NSString *) name;
-(void) showForForm: (JavascriptForm *) f;
-(void) hide;
-(void) selectControl: (FormControl *) ctl;
-(FormControl *) current;
@end
